const path = require('path')
const fs = require('fs')
const resolve = filePath => path.resolve(__dirname, '../', filePath)

const getDllName = () => {
    const names = fs.readdirSync(resolve('dll'))
    const name = names.find(n => {
        if (n.indexOf('dll-vendor') !== 0) {
            return false
        }
        if (path.extname(n) === '.json') {
            return false
        }
        return true
    });
    return name
}

exports.getDllName = getDllName